package com.newings.bitmapobject;

import android.graphics.Point;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity{

    ImageView ivModule;
    DoctorView doctorView;
    TextView tvModule;
    List<PointBean> list = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {




        ivModule = findViewById(R.id.ivModule);
        doctorView = findViewById(R.id.dvModule);
        tvModule = findViewById(R.id.tvModule);
        tvModule.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Log.e("log","点击");
                toNext(view);
            }
        });
    }

    public void toNext(View view) {
        list.clear();
        list.add(new PointBean(R.drawable.icon_module_point,4,1));
        list.add(new PointBean(R.drawable.icon_module_point,1,3));
        list.add(new PointBean(R.drawable.icon_module_point,2,5));
        list.add(new PointBean(R.drawable.icon_module_point,3,6));
        doctorView.setmPaintList(list);
        //doctorView.setmPaintLocation(3,6);
        //doctorView.setDrawableMethod(R.drawable.icon_module_blue_point);
        //        Intent intent = new Intent(this, ShowPointActivity.class);
        //        startActivity(intent);
    }
}